package com.yuw.singleton;

import org.junit.Test;

public class TestDriver01 {
    @Test
    public void test01() {
        // 获取单例模式的实例对象
        SingletonDemo singletonDemo = SingletonDemo.getSingletonDemoInstance();
        SingletonDemo singletonDemo1 = SingletonDemo.getSingletonDemoInstance();
        // 判定内存中是不是同一个对象【地址是否一样】 == 判定
        System.out.println("singletonDemo1 == singletonDemo:" + (singletonDemo1 == singletonDemo));

    }
}
